package com.learn.bean;

import com.learn.annotation.MyComponent;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

/**
 * @author DJJ_F
 * @version 1.0
 * @date 2024/11/16
 * @description 数据库中user表的封装，这个类和数据库的表是对应的
 */
@Component
public class User {
    @Value("jack")
    private String name;
    private int age;

    public User() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}

